package sample.retrofit

import retrofit.client.Response
import retrofit.{Callback, RetrofitError}
import sample.Person
import sample.retrofit.Adapter.adapter

/**
 * Created on 2015/6/21.
 *
 * @author Misty
 */
object TestScalaApi extends App {
    val api = adapter.create(classOf[ScalaApi])

    api.listAll(new Callback[List[Person]] {
        override def failure(error: RetrofitError): Unit = {
            println(error)
        }

        override def success(t: List[Person], response: Response): Unit = {
            println(t)
        }
    })
}
